-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: no roles being returned for anonymous user #15585
fix: no roles being returned for anonymous user #15585
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15585 +/- ##
=======================================
Coverage 76.87% 76.87%
=======================================
Files 976 976
Lines 51292 51293 +1
Branches 6907 6907
=======================================
+ Hits 39430 39431 +1
Misses 11643 11643
Partials 219 219
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! It looks like unit tests require some attention. Thanks!
I have seen other commits on master also failing the test that failed on this PR. Maybe it is not related. |
SUMMARY
Since 1.2.0 an anonymous user is unable to see a public dashboard.
This is caused because:
This will lead to an empty user payload
leading to an Unexpected error on the dashboard page.
My changes: since an anonymous user doesn't have roles associated, on the bootstrap_user_data function, I associate the public role to it, which then on this line respective permissions can be fetched.
BEFORE/AFTER
Before:
Screenshots present on the three issues descriptions
After:
Dashboards are displayed without login
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION